import { DataType } from "./type";
import type { IDeserializable } from "~/models/serialize/IDeserializable";
import { Deserializer } from "~/models/serialize/Deserializer";
import { Dzer } from "~/models/serialize";

// 定义: 接口类型 (和类型)：
// 不是一种具体的类型，而是类型的类型。在这里定义结构和生成器

export class NullType
  extends DataType
  implements IDeserializable
{
  
  className: string = 'NullType'

  static {
  }

  constructor(
  ) {
    super()
  }

  name = 'null'
  default = null
  receiveType(t: DataType) { return t.name === 'null' }
  receiveValue(t: any): boolean { return t === null }
}